<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%String ref = request.getHeader("REFERER");%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>广东省传播平台-合同详情展开页</title>
<link rel="stylesheet" type="text/css" href="<%=path%>/css/common.css" />
<link rel="stylesheet" type="text/css" href="<%=path%>/css/tag.css" />
<script type="text/javascript" src="<%=path%>/js/jquery-1.7.2.js"></script>
<link href="<%=path%>/js/My97DatePicker/skin/WdatePicker.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript">
			function doSubmit(url){
					document.forms[0].action=url;
					document.forms[0].submit();
			}
			
					//删除合同动作
	     function delContract(contractID){
			if(confirm('确定删除该条记录？')){
			var url = encodeURI(encodeURI("deleteContract.action?contractID=" +contractID));
				$.ajax({
			        url: url,
			        type:"POST",
			        cache:false,
			        success: function(message)
			        {
				    	if(message == "success")
				    	{
			        		alert("合同删除成功！");
			        		window.location.href="contractlist.action";
			        	}
			        	else if(message =="Nosuccess")
			        	{
				    		alert("媒体正在使用，合同删除失败！");
				    		//window.location.href="contractlist.action";
			        	}
			        	else if(message =="isDelete")
				    	{
				    		alert("该合同不存在，删除失败！");
				    		window.location.href="contractlist.action";
				    	}
				    	else if(message =="error")
				    	{
				    		window.location.href="contractlist.action";
				    	}
			   		}
		     	});
			}
	    }
	    
	    //编辑
	    function contractMofify(contractID){
		var url = encodeURI(encodeURI("turnToContractModify.action?contractID=" +contractID));
		window.location.href=url;
	    }
	    //下载文件
	    function downloadFile(fileName)
	    {
	      var url = encodeURI(encodeURI("downLoadContractFileName.action?fileName=" +fileName));
	      window.location.href=url;
	    }
	   $(function(){
        //selectNav('nav1');
    });
    function getback()
    {
       
       history.go(-1);
   //    var toType = ${toType}; 
   //    if(toType=='2')
   //    {
   //         doSubmit('mediaPriceAction.action');
   //    }
   //    else 
    //   {
   //       doSubmit('contractlist.action');
    //   }
    }
	</script>
</head>

<body>
<!-- 顶栏start -->
<jsp:include page="../common/top.jsp"></jsp:include>
<!-- 顶部start -->
<div id="main">
	<div class="body">
		<jsp:include page="../common/nav.jsp"></jsp:include>
		
		<!-- 主体 -->
		<div class="main_body">
		<form action="" method="post">
			<table class="condition" style="width:100%; font-size:14px; font-weight:bold; color:#000000;" align="center">
				<tr>
					<td>
						<input type="button" class="btn-title" value="返回" onclick="window.location.href='getUnits.action';" />
					</td>
				</tr>
			</table>
			
			<div id="list_div">
				<table class="table_list"  style="width: 100%;">
					<s:if test="%{null == unit}">
								<tr>
									<th style="width: 150px; text-align: center; color: red" colspan="3">
										该条记录不存在或已删除！									
									</th>
								</tr>
					</s:if>
					<s:else>
						<tr class="bg" style="border-left: 2px solid #f37c20;">
							<th colspan="4" style="font-size:15px; padding-left:18px;">部件信息</th>
						</tr>
						<tr style="background:#f2f2f2;">
							<th style="border-style:solid dashed dashed solid; width: ">部件编号</th>
							<th style="border-style:solid dashed dashed;">部件名称</th>
							<th style="border-style:solid dashed dashed;">部件类型</th>
							<th style="border-style:solid solid dashed dashed;">设备</th>
						</tr>
						<tr >
							<td style="border-style:dashed dashed solid solid;">
								${unit.unitID }
							</td>
							<td style="border-style:dashed dashed solid;">
								${unit.unitName }
							</td>
							<td style="border-style:dashed dashed solid;">
								${unit.unitType }
							</td>
							<td style="border-style:dashed solid solid dashed;">
								${unit.deviceID }
							</td>
						</tr>
						<tr style="background:#f2f2f2;">
							<th style="border-style:solid dashed dashed solid; width: ">安装人</th>
							<th style="border-style:solid dashed dashed;">安装时间</th>
							<th style="border-style:solid dashed dashed;">供应商</th>
							<th style="border-style:solid solid dashed dashed;">购买日期</th>
						</tr>
						<tr >
							<td style="border-style:dashed dashed solid solid;">
								${unit.fixMan }
							</td>
							<td style="border-style:dashed dashed solid;">
								${unit.fixTime }
							</td>
							<td style="border-style:dashed dashed solid;">
								${unit.supplier }
							</td>
							<td style="border-style:dashed solid solid dashed;">
								${unit.purchaseDate }
							</td>
						</tr>
						<tr style="background:#f2f2f2;">
							<th style="border-style:solid dashed dashed solid;">登记人</th>
							<th style="border-style:solid dashed dashed;">登记时间</th>
							<th style="border-style:solid dashed dashed;">状态</th>
							<th style="border-style:solid solid dashed dashed;">备注</th>
						</tr>
						<tr >
							<td style="border-style:dashed dashed solid solid;">
								${unit.registerMan }
							</td>
							<td style="border-style:dashed dashed solid;">
								${unit.registerTime }
							</td>
							<td style="border-style:dashed dashed solid;">
								${unit.status }
							</td>
							<td style="border-style:dashed solid solid dashed;">
								${unit.comments }
							</td>
						</tr>
					</s:else>
			  </table>
			</div>
			</form>
			</div>
		</div>
	</div>
</div>
<!-- 顶部end -->


<!-- 底部start -->
<div id="bottom">
	<div class="body">
		<label>版权所有&nbsp;&nbsp;&nbsp;&nbsp;2012东莞移动</label>
	</div>
</div>
<!-- 底部end -->
</body>
</html>
